home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Mathematics / Subtraction / card_8533.txt < prev    next >
Encoding:
Text File  |  1988-04-19  |  11.1 KB  |  488 lines

  1. -- card: 8533 from stack: in
  2. -- bmap block id: 5431
  3. -- flags: 0000
  4. -- background id: 8327
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 0001
  11. -- rect: left=251 top=87 right=180 bottom=351
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Frowney
  20.  
  21.  
  22. -- part 2 (button)
  23. -- low flags: 00
  24. -- high flags: 0001
  25. -- rect: left=256 top=229 right=320 bottom=352
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: Smiley
  34.  
  35.  
  36. -- part 3 (button)
  37. -- low flags: 00
  38. -- high flags: 8003
  39. -- rect: left=355 top=161 right=194 bottom=388
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 1
  43. -- font id: 0
  44. -- text size: 12
  45. -- style flags: 0
  46. -- line height: 16
  47. -- part name: 7
  48. ----- HyperTalk script -----
  49. on mouseUp
  50.   repeat with x=3 down to 1
  51.     if char x of field "Difference" is "?" then
  52.       put "7" into char x of field "Difference"
  53.       put x into it
  54.       subtract 1 from it
  55.       if  x>1 then put "?" into char it of field "Difference"
  56.       exit mouseUp
  57.     end if
  58.   end repeat
  59. end mouseUp
  60.  
  61.  
  62.  
  63. -- part 4 (button)
  64. -- low flags: 00
  65. -- high flags: 8003
  66. -- rect: left=395 top=161 right=194 bottom=427
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 0 / 0
  69. -- text alignment: 1
  70. -- font id: 0
  71. -- text size: 12
  72. -- style flags: 0
  73. -- line height: 16
  74. -- part name: 8
  75. ----- HyperTalk script -----
  76. on mouseUp
  77.   repeat with x=3 down to 1
  78.     if char x of field "Difference" is "?" then
  79.       put "8" into char x of field "Difference"
  80.       put x into it
  81.       subtract 1 from it
  82.       if  x>1 then put "?" into char it of field "Difference"
  83.       exit mouseUp
  84.     end if
  85.   end repeat
  86. end mouseUp
  87.  
  88.  
  89.  
  90. -- part 5 (button)
  91. -- low flags: 00
  92. -- high flags: 8003
  93. -- rect: left=435 top=162 right=194 bottom=467
  94. -- title width / last selected line: 0
  95. -- icon id / first selected line: 0 / 0
  96. -- text alignment: 1
  97. -- font id: 0
  98. -- text size: 12
  99. -- style flags: 0
  100. -- line height: 16
  101. -- part name: 9
  102. ----- HyperTalk script -----
  103. on mouseUp
  104.   repeat with x=3 down to 1
  105.     if char x of field "Difference" is "?" then
  106.       put "9" into char x of field "Difference"
  107.       put x into it
  108.       subtract 1 from it
  109.       if  x>1 then put "?" into char it of field "Difference"
  110.       exit mouseUp
  111.     end if
  112.   end repeat
  113. end mouseUp
  114.  
  115.  
  116.  
  117. -- part 6 (button)
  118. -- low flags: 00
  119. -- high flags: 8003
  120. -- rect: left=356 top=201 right=233 bottom=389
  121. -- title width / last selected line: 0
  122. -- icon id / first selected line: 0 / 0
  123. -- text alignment: 1
  124. -- font id: 0
  125. -- text size: 12
  126. -- style flags: 0
  127. -- line height: 16
  128. -- part name: 4
  129. ----- HyperTalk script -----
  130. on mouseUp
  131.   repeat with x=3 down to 1
  132.     if char x of field "Difference" is "?" then
  133.       put "4" into char x of field "Difference"
  134.       put x into it
  135.       subtract 1 from it
  136.       if  x>1 then put "?" into char it of field "Difference"
  137.       exit mouseUp
  138.     end if
  139.   end repeat
  140. end mouseUp
  141.  
  142.  
  143.  
  144. -- part 7 (button)
  145. -- low flags: 00
  146. -- high flags: 8003
  147. -- rect: left=395 top=202 right=234 bottom=428
  148. -- title width / last selected line: 0
  149. -- icon id / first selected line: 0 / 0
  150. -- text alignment: 1
  151. -- font id: 0
  152. -- text size: 12
  153. -- style flags: 0
  154. -- line height: 16
  155. -- part name: 5
  156. ----- HyperTalk script -----
  157. on mouseUp
  158.   repeat with x=3 down to 1
  159.     if char x of field "Difference" is "?" then
  160.       put "5" into char x of field "Difference"
  161.       put x into it
  162.       subtract 1 from it
  163.       if  x>1 then put "?" into char it of field "Difference"
  164.       exit mouseUp
  165.     end if
  166.   end repeat
  167. end mouseUp
  168.  
  169.  
  170.  
  171. -- part 8 (button)
  172. -- low flags: 00
  173. -- high flags: 8003
  174. -- rect: left=435 top=201 right=233 bottom=466
  175. -- title width / last selected line: 0
  176. -- icon id / first selected line: 0 / 0
  177. -- text alignment: 1
  178. -- font id: 0
  179. -- text size: 12
  180. -- style flags: 0
  181. -- line height: 16
  182. -- part name: 6
  183. ----- HyperTalk script -----
  184. on mouseUp
  185.   repeat with x=3 down to 1
  186.     if char x of field "Difference" is "?" then
  187.       put "6" into char x of field "Difference"
  188.       put x into it
  189.       subtract 1 from it
  190.       if  x>1 then put "?" into char it of field "Difference"
  191.       exit mouseUp
  192.     end if
  193.   end repeat
  194. end mouseUp
  195.  
  196.  
  197.  
  198. -- part 9 (button)
  199. -- low flags: 00
  200. -- high flags: 8003
  201. -- rect: left=356 top=242 right=274 bottom=389
  202. -- title width / last selected line: 0
  203. -- icon id / first selected line: 0 / 0
  204. -- text alignment: 1
  205. -- font id: 0
  206. -- text size: 12
  207. -- style flags: 0
  208. -- line height: 16
  209. -- part name: 1
  210. ----- HyperTalk script -----
  211. on mouseUp
  212.   repeat with x=3 down to 1
  213.     if char x of field "Difference" is "?" then
  214.       put "1" into char x of field "Difference"
  215.       put x into it
  216.       subtract 1 from it
  217.       if  x>1 then put "?" into char it of field "Difference"
  218.       exit mouseUp
  219.     end if
  220.   end repeat
  221. end mouseUp
  222.  
  223.  
  224.  
  225. -- part 10 (button)
  226. -- low flags: 00
  227. -- high flags: 8003
  228. -- rect: left=395 top=241 right=273 bottom=428
  229. -- title width / last selected line: 0
  230. -- icon id / first selected line: 0 / 0
  231. -- text alignment: 1
  232. -- font id: 0
  233. -- text size: 12
  234. -- style flags: 0
  235. -- line height: 16
  236. -- part name: 2
  237. ----- HyperTalk script -----
  238. on mouseUp
  239.   repeat with x=3 down to 1
  240.     if char x of field "Difference" is "?" then
  241.       put "2" into char x of field "Difference"
  242.       put x into it
  243.       subtract 1 from it
  244.       if  x>1 then put "?" into char it of field "Difference"
  245.       exit mouseUp
  246.     end if
  247.   end repeat
  248. end mouseUp
  249.  
  250.  
  251.  
  252. -- part 11 (button)
  253. -- low flags: 00
  254. -- high flags: 8003
  255. -- rect: left=436 top=242 right=274 bottom=468
  256. -- title width / last selected line: 0
  257. -- icon id / first selected line: 0 / 0
  258. -- text alignment: 1
  259. -- font id: 0
  260. -- text size: 12
  261. -- style flags: 0
  262. -- line height: 16
  263. -- part name: 3
  264. ----- HyperTalk script -----
  265. on mouseUp
  266.   repeat with x=3 down to 1
  267.     if char x of field "Difference" is "?" then
  268.       put "3" into char x of field "Difference"
  269.       put x into it
  270.       subtract 1 from it
  271.       if  x>1 then put "?" into char it of field "Difference"
  272.       exit mouseUp
  273.     end if
  274.   end repeat
  275. end mouseUp
  276.  
  277.  
  278.  
  279. -- part 12 (button)
  280. -- low flags: 00
  281. -- high flags: 8003
  282. -- rect: left=356 top=281 right=313 bottom=408
  283. -- title width / last selected line: 0
  284. -- icon id / first selected line: 0 / 0
  285. -- text alignment: 1
  286. -- font id: 0
  287. -- text size: 12
  288. -- style flags: 0
  289. -- line height: 16
  290. -- part name: 0
  291. ----- HyperTalk script -----
  292. on mouseUp
  293.   repeat with x=3 down to 1
  294.     if char x of field "Difference" is "?" then
  295.       put "0" into char x of field "Difference"
  296.       put x into it
  297.       subtract 1 from it
  298.       if  x>1 then put "?" into char it of field "Difference"
  299.       exit mouseUp
  300.     end if
  301.   end repeat
  302. end mouseUp
  303.  
  304.  
  305.  
  306. -- part 13 (button)
  307. -- low flags: 00
  308. -- high flags: 8003
  309. -- rect: left=414 top=281 right=313 bottom=468
  310. -- title width / last selected line: 0
  311. -- icon id / first selected line: 0 / 0
  312. -- text alignment: 1
  313. -- font id: 0
  314. -- text size: 12
  315. -- style flags: 0
  316. -- line height: 16
  317. -- part name: Enter
  318. ----- HyperTalk script -----
  319. on mouseUp
  320.   global answer
  321.   if field "Flag" > 0 then exit mouseUp
  322.   put field "Minuend" into answer
  323.   subtract field "subtrahend" from answer
  324.   add 1 to field "Attempts"
  325.   if field "Difference" = answer then
  326.     add 1 to field "Correct"
  327.     get field "Correct"
  328.     divide it by field "Attempts"
  329.     multiply it by 100
  330.     put round(it) into field "Percent"
  331.     celebrate
  332.   else
  333.     get field "Correct"
  334.     divide it by field "Attempts"
  335.     multiply it by 100
  336.     put round(it) into field "Percent"
  337.     nag
  338.   end if
  339. end mouseUp
  340.  
  341. on celebrate
  342.   put "Correct" into line 1 of field "Comment"
  343.   put first word of bkgnd field "Name" into line 2 of field "Comment"
  344.   hide button "Smiley"
  345.   put "1" into field "Flag"
  346.   if first word of bkgnd field "Options" = "Y" then
  347.     play "Harpsichord" tempo 200 "g4e c5 e gh eq gh"
  348.   end if
  349. end celebrate
  350.  
  351. on nag
  352.   global answer
  353.   put "WRONG!" into line 1 of field "Comment"
  354.   put "The answer is "& answer & "." into line 2 of field "Comment"
  355.   hide button "Frowney"
  356.   put "2" into field "Flag"
  357.   if first word of bkgnd field "Options" = "Y" then
  358.     play "boing" tempo 200 "gq c e a"
  359.   end if
  360. end nag
  361.  
  362.  
  363.  
  364. -- part 14 (button)
  365. -- low flags: 00
  366. -- high flags: 8003
  367. -- rect: left=354 top=102 right=139 bottom=468
  368. -- title width / last selected line: 0
  369. -- icon id / first selected line: 0 / 0
  370. -- text alignment: 1
  371. -- font id: 0
  372. -- text size: 12
  373. -- style flags: 0
  374. -- line height: 16
  375. -- part name: Next Problem
  376. ----- HyperTalk script -----
  377. on mouseUp
  378.   if field "Flag" = 0 then exit mouseUp
  379.   show button "Smiley"
  380.   show button "Frowney"
  381.   put empty into field "Comment"
  382.   put "   " into field "Minuend"
  383.   put "   " into field "Subtrahend"
  384.   put "   " into field "Difference"
  385.   put "   " into num1
  386.   put "   " into num2
  387.   if field "Attempts" = second word of bkgnd field "Options" then
  388.     put field "Attempts" into attempts
  389.     put field "Correct" into correct
  390.     put field "Percent" into percent
  391.     put field "Name" into name
  392.     put third word of field "Options" into skill
  393.     put "O" into field "Attempts"
  394.     put "O" into field "Correct"
  395.     put "O" into field "Percent"
  396.     set the lockScreen to true
  397.     set the cursor to 4
  398.     go to first card of bkgnd "Users"
  399.     rotateData
  400.     put name into line 1 of field "name"
  401.     put the date into line 1 of field "Date"
  402.     put skill into line 1 of field "Skill"
  403.     put attempts into line 1 of field "Attempts"
  404.     put correct into line 1 of field "Correct"
  405.     put percent into line 1 of field "Percent"
  406.     pop card
  407.     exit mouseUp
  408.   end if
  409.  
  410.   repeat
  411.     get the random of 900
  412.     add 99 to it
  413.     put it into num1
  414.     get the random of 900
  415.     add 99 to it
  416.     put it into num2
  417.     if num2>num1 then
  418.       put num1 into temp
  419.       put num1 into num2
  420.       put temp into num1
  421.     end if
  422.     if (num1-num2)>99 then exit repeat
  423.   end repeat
  424.   put num1 into field "Minuend"
  425.   put num2 into field "Subtrahend"
  426.   put "   " into field "Difference"
  427.   put "0" into field "Flag"
  428.   put "?" into char 3 of field "Difference"
  429. end mouseUp
  430.  
  431. on rotateData
  432.   repeat with x = 11 down to 1
  433.     if line x of field "Name" is empty then next repeat
  434.     put x into nextLine
  435.     add 1 to nextLine
  436.     get line x of field "Name"
  437.     put it into line nextLine of field "Name"
  438.     get line x of field "Date"
  439.     put it into line nextLine of field "Date"
  440.     get line x of field "Skill"
  441.     put it into line nextLine of field "Skill"
  442.     get line x of field "Attempts"
  443.     put it into line nextLine of field "Attempts"
  444.     get line x of field "Correct"
  445.     put it into line nextLine of field "Correct"
  446.     get line x of field "Percent"
  447.     put it into line nextLine of field "Percent"
  448.   end repeat
  449. end rotateData
  450.  
  451.  
  452.  
  453.  
  454. -- part contents for background part 2
  455. ----- text -----
  456. O
  457.  
  458. -- part contents for background part 3
  459. ----- text -----
  460. O
  461.  
  462. -- part contents for background part 4
  463. ----- text -----
  464. O
  465.  
  466. -- part contents for background part 5
  467. ----- text -----
  468.    
  469.  
  470. -- part contents for background part 6
  471. ----- text -----
  472.    
  473.  
  474. -- part contents for background part 9
  475. ----- text -----
  476. 1
  477.  
  478. -- part contents for background part 10
  479. ----- text -----
  480. Y 25 7
  481.  
  482. -- part contents for background part 11
  483. ----- text -----
  484. Larry
  485.  
  486. -- part contents for background part 7
  487. ----- text -----
  488.